import {download,read} from '@/axios/request'
import Request from '@/axios/request'

export function forceDelete(route_id, id) {
  return Request.delete(`forceDelete/${route_id}/${id}`)
}

export function deleteBatch(route_id, id) {
    return Request.post(`deleteBatch/${route_id}`, {
        _method: 'DELETE',
        id,
    })
}

export function forceDeleteBatch(route_id, id) {
    return Request.post(`forceDeleteBatch/${route_id}`, {
        _method: 'DELETE',
        id,
    })
}

export function restore(route_id, id) {
    return Request.put(`restore/${route_id}/${id}`)
}

export function restoreBatch(route_id, id) {
    return Request.put(`restoreBatch/${route_id}`, {id})
}

export function downloadFile(file_url, file_name) {
    return download(file_url, file_name)
}

export function getText(text_url) {
    return read(text_url)
}